<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<infopost-request>
			<xsl:for-each select="TXLifeRequest">
				<!--Variable: 权益信息ID-->
				<xsl:variable name="HoldingID">
					<xsl:value-of select="OLifE/Holding[Policy]/@id"/>
				</xsl:variable>
				<!--Variable: 权益对应的代理人ID-->
				<xsl:variable name="AgentID">
					<xsl:value-of select="OLifE/Relation[@OriginatingObjectID=string($HoldingID) and OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='11' ][1]/@RelatedObjectID"/>
				</xsl:variable>
				<!--Variable: 权益对应的经纪人ID-->
				<xsl:variable name="BKID">
					<xsl:value-of select="OLifE/Relation[@OriginatingObjectID=string($HoldingID) and OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='83' ][1]/@RelatedObjectID"/>
				</xsl:variable>
				<!--Variable: 权益对应领款帐号ID-->
				<xsl:variable name="Bank2ID">
					<xsl:value-of select="//Relation[@OriginatingObjectID=string($HoldingID) and OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='1002' ][1]/@RelatedObjectID"/>
				</xsl:variable>
				<xsl:variable name="HasWaiver">
					<xsl:value-of select="count(//CovOption/ProductCode)"/>
				</xsl:variable>
				<request-head>
					<trans-id>
						<xsl:value-of select="TransRefGUID"/>
					</trans-id>
					<!--交易流水号-->
					<trans-type>102</trans-type>
					<!--交易类型-->
					<trans-date>
						<xsl:value-of select="substring(translate(string(TransExeDate),'-',''),1,8)"/>
					</trans-date>
					<!--交易日期-->
					<trans-time>
						<xsl:value-of select="translate(substring(TransExeTime,1,8),':','')"/>
					</trans-time>
					<xsl:for-each select="//Party[@id=string($AgentID)]">
						<post>
							<xsl:value-of select="Producer/OLifEExtension/ProducerCode"/>
						</post>
						<area/>
						<bank/>
						<branch>
							<xsl:value-of select="Producer/CarrierAppointment/CompanyProducerID"/>
						</branch>
					</xsl:for-each>
					<xsl:for-each select="//Party[@id=string($BKID)]">
						<post>
							<xsl:value-of select="Producer/OLifEExtension/ProducerCode"/>
						</post>
						<area/>
						<bank/>
						<branch>
							<xsl:value-of select="Producer/CarrierAppointment/CompanyProducerID"/>
						</branch>
					</xsl:for-each>
					<agency-hand/>
					<authorized/>
					<!--交易时间-->
					<column9>
						<xsl:value-of select="//Holding[Policy]/Policy/OLifEExtension/ActCollectInd"/>
					</column9>
					<!--是否收费成功-->
					<xsl:for-each select="//Holding[@id=string($Bank2ID)]">
						<column4>
							<xsl:value-of select="Banking/OLifEExtension/BankCode"/>
						</column4>
						<!--银行代码-->
						<column5>
							<xsl:value-of select="Banking/OLifEExtension/BankBranchCode"/>
						</column5>
						<!--分行代码-->
						<column6>
							<xsl:value-of select="Banking/AccountNumber"/>
						</column6>
						<!--银行账号-->
						<column7>
							<xsl:value-of select="Banking/AcctHolderName"/>
						</column7>
						<!--账户所有人姓名-->
						<column8>
							<xsl:value-of select="Banking/CreditDebitType/@tc"/>
						</column8>
						<!--卡折-->
					</xsl:for-each>
					<!--领款账户-->
				</request-head>
				<request-newbiz>
					<request-underwriting>
						<application>
							<apply-code>
								<xsl:value-of select="OLifE/Holding[@id='Policy_1']/Policy/ApplicationInfo/HOAppFormNumber"/>
							</apply-code>
							<!--投保单号-->
							<pay-mode>
								<xsl:value-of select="//Holding[@id='Policy_1']/Policy/PaymentMethod/@tc"/>
							</pay-mode>
							<xsl:for-each select="//Party[@id=string($AgentID)]">
								<agent-code>
									<xsl:value-of select="Producer/OLifEExtension/ProducerCode"/>
								</agent-code>
								<!--代理人代码/经代公司代码-->
								<agency-hand>
									<xsl:value-of select="FullName"/>
								</agency-hand>
								<!--代理人姓名-->
								<agent-tel>
									<xsl:value-of select="Phone/DialNumber"/>
								</agent-tel>
								<!--代理人电话 agencyTel-->
								<agency-code>
									<xsl:value-of select="Producer/OLifEExtension/ProducerCode"/>
								</agency-code>
								<!--经代渠道保单所属机构-->
							</xsl:for-each>
							<xsl:for-each select="//Party[@id=string($BKID)]">
								<post>
									<xsl:value-of select="Producer/OLifEExtension/ProducerCode"/>
								</post>
								<!--代理人代码/经代公司代码-->
								<agency-hand>
									<xsl:value-of select="FullName"/>
								</agency-hand>
								<!--代理人姓名-->
								<service-agent-tel>
									<xsl:value-of select="Phone/DialNumber"/>
								</service-agent-tel>
								<!--代理人电话 agencyTel-->
								<organ-id>
									<xsl:value-of select="Producer/CarrierAppointment/CompanyProducerID"/>
								</organ-id>
								<!--经代渠道保单所属机构-->
							</xsl:for-each>
							<column1>
								<xsl:value-of select="OLifE/Holding[Policy]/Policy/OLifEExtension/PolicyPrintType/@tc"/>
							</column1>
							<!--保单样式（电子、纸质）-->
							<xsl:for-each select="OLifE/Holding[Policy]">
								<!--Variable: 权益对应的投保人ID-->
								<xsl:variable name="PhID">
									<xsl:value-of select="//Relation[@OriginatingObjectID=string($HoldingID) and OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='8' ][1]/@RelatedObjectID"/>
								</xsl:variable>
								<xsl:variable name="MainRelation">
									<xsl:value-of select="Policy/Life/Coverage/LifeParticipant/OLifEExtension/InsuredApplicantRel/@tc"/>
								</xsl:variable>
								<xsl:for-each select="../Party[@id=string($PhID)]">
									<policy-holder>
										<!--投保人信息-->
										<real-name>
											<xsl:value-of select="FullName"/>
										</real-name>
										<!--姓名-->
										<gender>
											<xsl:if test="Person/Gender/@tc=1">
                      M
                      </xsl:if>
											<xsl:if test="Person/Gender/@tc=2">
                      F
                      </xsl:if>
										</gender>
										<!--性别-->
										<birthday>
											<xsl:value-of select="substring(translate(string(Person/BirthDate),'-',''),1,8)"/>
										</birthday>
										<!--出生日期-->
										<certi-type>
											<xsl:value-of select="GovtIDInfo/GovtIDTC/@tc"/>
										</certi-type>
										<!--证件类型-->
										<certi-code>
											<xsl:value-of select="GovtIDInfo/GovtID"/>
										</certi-code>
										<!--证件号码-->
										<certi-end-date>
											<xsl:value-of select="substring(translate(string(GovtIDInfo/GovtIDExpDate),'-',''),1,8)"/>
										</certi-end-date>
										<!--有效期限-->
										<nationality>
											<xsl:value-of select="Person/Citizenship/@tc"/>
										</nationality>
										<!--国籍-->
										<marriage-id>
											<xsl:value-of select="Person/MarStat/@tc"/>
										</marriage-id>
										<!--婚姻状况-->
										<job-com>
											<xsl:value-of select="Employment/EmployerName"/>
										</job-com>
										<!--工作单位-->
										<job-name>
											<xsl:value-of select="Person/OccupationType"/>
										</job-name>
										<!--职业名称-->
										<job-code>
											<xsl:value-of select="Person/OccupationType"/>
										</job-code>
										<!--职业编码-->
										<celler>
											<xsl:value-of select="Phone[@id='Phone_2']/DialNumber"/>
										</celler>
										<!--移动电话-->
										<day-phone>
											<xsl:value-of select="Phone[@id='Phone_1']/DialNumber"/>
										</day-phone>
										<!--固定电话-->
										<email>
											<xsl:value-of select="EMailAddress/AddrLine"/>
										</email>
										<!--电子邮箱-->
										<city-province>
											<xsl:value-of select="Address/AddressState"/>
										</city-province>
										<!--省-->
										<district>
											<xsl:value-of select="Address/City"/>
										</district>
										<!--市-->
										<ward>
											<xsl:value-of select="Address/AddressCountry"/>
										</ward>
										<!--区/县-->
										<rela-address>
											<xsl:value-of select="Address/Line1"/>
										</rela-address>
										<!--街道-->
										<rela-zip>
											<xsl:value-of select="Address/Zip"/>
										</rela-zip>
										<!--邮政编码-->
										<yearly-income>
											<xsl:value-of select="Employment/AnnualSalary"/>
										</yearly-income>
										<!--年收入-->
									</policy-holder>
								</xsl:for-each>
								<life-assureds>
									<!--被保人信息-循环-->
									<xsl:for-each select="../Relation[OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='1']">
										<!--Variable: 权益对应的被保人ID-->
										<xsl:variable name="MainLaID">
											<xsl:value-of select="./@RelatedObjectID"/>
										</xsl:variable>
										<!--Variable: 权益对应的被保人seqnumber-->
										<xsl:variable name="seqNO">
											<xsl:value-of select="position()"/>
										</xsl:variable>
										<xsl:for-each select="../Party[@id=string($MainLaID)]">
											<life-assured>
												<la-no>
													<xsl:number value="$seqNO"/>
												</la-no>
												<!--被保人序号-->
												<relation-with-policy-holder>
													<xsl:value-of select="//Holding[Policy]/Policy/Life/Coverage/LifeParticipant[@PartyID=string($MainLaID)]/OLifEExtension/InsuredApplicantRel/@tc"/>
												</relation-with-policy-holder>
												<!--与投保人的关系-->
												<real-name>
													<xsl:value-of select="FullName"/>
												</real-name>
												<!--姓名-->
												<gender>
													<xsl:if test="Person/Gender/@tc=1">
                      M
                      </xsl:if>
													<xsl:if test="Person/Gender/@tc=2">
                      F
                      </xsl:if>
												</gender>
												<!--性别-->
												<birthday>
													<xsl:value-of select="substring(translate(string(Person/BirthDate),'-',''),1,8)"/>
												</birthday>
												<!--出生日期-->
												<certi-type>
													<xsl:value-of select="GovtIDInfo/GovtIDTC/@tc"/>
												</certi-type>
												<!--证件类型-->
												<certi-code>
													<xsl:value-of select="GovtIDInfo/GovtID"/>
												</certi-code>
												<!--证件号码-->
												<certi-end-date>
													<xsl:value-of select="substring(translate(string(GovtIDInfo/GovtIDExpDate),'-',''),1,8)"/>
												</certi-end-date>
												<!--有效期限-->
												<nationality>
													<xsl:value-of select="Person/Citizenship/@tc"/>
												</nationality>
												<!--国籍-->
												<marriage-id>
													<xsl:value-of select="Person/MarStat/@tc"/>
												</marriage-id>
												<!--婚姻状况-->
												<job-com>
													<xsl:value-of select="Employment/EmployerName"/>
												</job-com>
												<!--工作单位-->
												<job-name>
													<xsl:value-of select="Person/OccupationType"/>
												</job-name>
												<!--职业名称-->
												<job-code>
													<xsl:value-of select="Person/OccupationType"/>
												</job-code>
												<!--职业编码-->
												<celler>
													<xsl:value-of select="Phone[@id='Phone_2']/DialNumber"/>
												</celler>
												<!--移动电话-->
												<night-phone>
													<xsl:value-of select="Phone[@id='Phone_1']/DialNumber"/>
												</night-phone>
												<!--固定电话-->
												<day-phone>
													<xsl:value-of select="Phone[@id='Phone_1']/DialNumber"/>
												</day-phone>
												<!--固定电话-->
												<email>
													<xsl:value-of select="EMailAddress/AddrLine"/>
												</email>
												<!--电子邮箱-->
												<city-province>
													<xsl:value-of select="Address/AddressState"/>
												</city-province>
												<!--省-->
												<district>
													<xsl:value-of select="Address/City"/>
												</district>
												<!--市-->
												<ward>
													<xsl:value-of select="Address/AddressCountry"/>
												</ward>
												<!--区/县-->
												<rela-address>
													<xsl:value-of select="Address/Line1"/>
												</rela-address>
												<!--街道-->
												<rela-zip>
													<xsl:value-of select="Address/Zip"/>
												</rela-zip>
												<!--邮政编码-->
												<yearly-income>
													<xsl:value-of select="Employment/AnnualSalary"/>
												</yearly-income>
												<!--年收入-->
												<social-security-status>
													<xsl:value-of select="Client/GovtSocialInsEligibilityInd"/>
												</social-security-status>
												<!--社保状态-->
												<xsl:choose>
													<xsl:when test="count(//FormInstance)=1">
														<xsl:for-each select="//FormResponse[ResponseCode='33']">
															<height>
																<xsl:value-of select="ResponseText"/>
															</height>
														</xsl:for-each>
														<xsl:for-each select="//FormResponse[ResponseCode='34']">
															<weight>
																<xsl:value-of select="ResponseText"/>
															</weight>
														</xsl:for-each>
													</xsl:when>
													<xsl:otherwise>
														<xsl:for-each select="../FormInstance[@RelatedObjectID=string($MainLaID)]">
															<xsl:for-each select="./FormResponse[ResponseCode='33']">
																<height>
																	<xsl:value-of select="ResponseText"/>
																</height>
															</xsl:for-each>
															<xsl:for-each select="./FormResponse[ResponseCode='34']">
																<weight>
																	<xsl:value-of select="ResponseText"/>
																</weight>
															</xsl:for-each>
														</xsl:for-each>
													</xsl:otherwise>
												</xsl:choose>
											</life-assured>
										</xsl:for-each>
									</xsl:for-each>
									<xsl:choose>
										<xsl:when test="$HasWaiver&gt;0">
											<xsl:choose>
												<xsl:when test="$MainRelation!=1">
													<xsl:for-each select="../Party[@id=string($PhID)]">
														<life-assured>
															<la-no>
																<xsl:number value="2"/>
															</la-no>
															<!--被保人序号-->
															<relation-with-policy-holder>
                          1
                        </relation-with-policy-holder>
															<!--与投保人的关系-->
															<real-name>
																<xsl:value-of select="FullName"/>
															</real-name>
															<!--姓名-->
															<gender>
																<xsl:if test="Person/Gender/@tc=1">
                      M
                      </xsl:if>
																<xsl:if test="Person/Gender/@tc=2">
                      F
                      </xsl:if>
															</gender>
															<!--性别-->
															<birthday>
																<xsl:value-of select="substring(translate(string(Person/BirthDate),'-',''),1,8)"/>
															</birthday>
															<!--出生日期-->
															<certi-type>
																<xsl:value-of select="GovtIDInfo/GovtIDTC/@tc"/>
															</certi-type>
															<!--证件类型-->
															<certi-code>
																<xsl:value-of select="GovtIDInfo/GovtID"/>
															</certi-code>
															<!--证件号码-->
															<certi-end-date>
																<xsl:value-of select="substring(translate(string(GovtIDInfo/GovtIDExpDate),'-',''),1,8)"/>
															</certi-end-date>
															<!--有效期限-->
															<nationality>
																<xsl:value-of select="Person/Citizenship/@tc"/>
															</nationality>
															<!--国籍-->
															<marriage-id>
																<xsl:value-of select="Person/MarStat/@tc"/>
															</marriage-id>
															<!--婚姻状况-->
															<job-com>
																<xsl:value-of select="Employment/EmployerName"/>
															</job-com>
															<!--工作单位-->
															<job-name>
																<xsl:value-of select="Person/OccupationType"/>
															</job-name>
															<!--职业名称-->
															<job-code>
																<xsl:value-of select="Person/OccupationType"/>
															</job-code>
															<!--职业编码-->
															<celler>
																<xsl:value-of select="Phone[@id='Phone_2']/DialNumber"/>
															</celler>
															<!--移动电话-->
															<night-phone>
																<xsl:value-of select="Phone[@id='Phone_1']/DialNumber"/>
															</night-phone>
															<!--固定电话-->
															<day-phone>
																<xsl:value-of select="Phone[@id='Phone_1']/DialNumber"/>
															</day-phone>
															<!--固定电话-->
															<email>
																<xsl:value-of select="EMailAddress/AddrLine"/>
															</email>
															<!--电子邮箱-->
															<city-province>
																<xsl:value-of select="Address/AddressState"/>
															</city-province>
															<!--省-->
															<district>
																<xsl:value-of select="Address/City"/>
															</district>
															<!--市-->
															<ward>
																<xsl:value-of select="Address/AddressCountry"/>
															</ward>
															<!--区/县-->
															<rela-address>
																<xsl:value-of select="Address/Line1"/>
															</rela-address>
															<!--街道-->
															<rela-zip>
																<xsl:value-of select="Address/Zip"/>
															</rela-zip>
															<!--邮政编码-->
															<yearly-income>
																<xsl:value-of select="Employment/AnnualSalary"/>
															</yearly-income>
															<!--年收入-->
															<social-security-status>
																<xsl:value-of select="Client/GovtSocialInsEligibilityInd"/>
															</social-security-status>
															<!--社保状态-->
															<xsl:for-each select="../FormInstance[@RelatedObjectID=string($PhID)]">
																<xsl:for-each select="./FormResponse[ResponseCode='33']">
																	<height>
																		<xsl:value-of select="ResponseText"/>
																	</height>
																</xsl:for-each>
																<xsl:for-each select="./FormResponse[ResponseCode='34']">
																	<weight>
																		<xsl:value-of select="ResponseText"/>
																	</weight>
																</xsl:for-each>
															</xsl:for-each>
														</life-assured>
													</xsl:for-each>
												</xsl:when>
											</xsl:choose>
										</xsl:when>
									</xsl:choose>
								</life-assureds>
								<beneficiaries>
									<!--受益人信息-循环-->
									<xsl:for-each select="../Relation[OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='34']">
										<!--Variable: 权益对应的受益人ID-->
										<xsl:variable name="BeneID">
											<xsl:value-of select="./@RelatedObjectID"/>
										</xsl:variable>
										<xsl:variable name="BeneRelate">
											<xsl:value-of select="RelatedObjectType/@tc"/>
										</xsl:variable>
										<xsl:for-each select="../Party[@id=string($BeneID)]">
											<beneficiary>
												<real-name>
													<xsl:value-of select="FullName"/>
												</real-name>
												<!--姓名-->
												<gender>
													<xsl:if test="Person/Gender/@tc=1">
                      M
                      </xsl:if>
													<xsl:if test="Person/Gender/@tc=2">
                      F
                      </xsl:if>
												</gender>
												<!--性别-->
												<birthday>
													<xsl:value-of select="substring(translate(string(Person/BirthDate),'-',''),1,8)"/>
												</birthday>
												<!--出生日期-->
												<certi-type>
													<xsl:value-of select="GovtIDInfo/GovtIDTC/@tc"/>
												</certi-type>
												<!--证件类型-->
												<certi-code>
													<xsl:value-of select="GovtIDInfo/GovtID"/>
												</certi-code>
												<!--证件号码-->
												<relation-with-insured>
													<xsl:value-of select="//Relation[@RelatedObjectID=string($BeneID)]/RelatedObjectType/@tc"/>
												</relation-with-insured>
												<!--受益人与被保人关系-->
												<certi-end-date>
													<xsl:value-of select="substring(translate(string(GovtIDInfo/GovtIDExpDate),'-',''),1,8)"/>
												</certi-end-date>
												<!--有效期限-->
												<bene-type>2</bene-type>
												<!--受益人角色-->
												<bene-order>
													<xsl:value-of select="//Relation[@RelatedObjectID=string($BeneID)]/BeneficiarySeqNum"/>
												</bene-order>
												<!--受益顺序-->
												<bene-rate>
													<xsl:value-of select="//Relation[@RelatedObjectID=string($BeneID)]/InterestPercent"/>
												</bene-rate>
												<!--受益比例-->
												<legal-bene-indi>
													<xsl:value-of select="//Relation[@RelatedObjectID=string($BeneID)]/OLifEExtension/DividendBenefitInd"/>
												</legal-bene-indi>
												<!--是否是红利受益人-->
											</beneficiary>
										</xsl:for-each>
									</xsl:for-each>
								</beneficiaries>
								<products>
									<!--险种信息-循环-->
									<xsl:for-each select="../Holding[Policy]/Policy/Life/Coverage">
										<product>
											<product-name>
												<xsl:value-of select="PlanName"/>
											</product-name>
											<!--险种名称-->
											<product-code>
												<xsl:value-of select="ProductCode"/>
											</product-code>
											<!--险种代码-->
											<la-no>
												<xsl:value-of select="LifeParticipant/InsuredSeqNum"/>
											</la-no>
											<!--被保人序号-->
											<coverage-period>
												<xsl:value-of select="OLifEExtension/DurationType/@tc"/>
											</coverage-period>
											<!--保障期间类型-->
											<coverage-year>
												<xsl:value-of select="DurationDesign"/>
											</coverage-year>
											<!--保障期间-->
											<charge-period>
												<xsl:value-of select="OLifEExtension/PayDurationType/@tc"/>
											</charge-period>
											<!--缴费期间类型-->
											<charge-year>
												<xsl:if test="OLifEExtension/PayDurationType[@tc='2']">
													<xsl:value-of select="PayToYear"/>
												</xsl:if>
												<xsl:if test="OLifEExtension/PayDurationType[@tc='3']">
													<xsl:value-of select="PayToAge"/>
												</xsl:if>
											</charge-year>
											<!--缴费期间-->
											<charge-mode>
												<xsl:value-of select="PaymentMode/@tc"/>
											</charge-mode>
											<!--缴费方式-->
											<amount>
												<xsl:value-of select="CurrentAmt"/>
											</amount>
											<!--保险金额-->
											<count-way>
												<xsl:value-of select="OLifEExtension/PremRule /@tc"/>
											</count-way>
											<!--保费计算方式-->
											<unit>
												<xsl:value-of select="CurrentNumberOfUnits"/>
											</unit>
											<!--份数-->
											<discount-prem>
												<xsl:value-of select="TargetPremAmt"/>
											</discount-prem>
											<!--保险费-->
											<column4>
												<xsl:value-of select="ExcessPremAmtITD"/>
											</column4>
											<!--追加保险费-->
											<deduct>
												<xsl:value-of select="DeductionOption/DeductAmt"/>
											</deduct>
											<!--免陪额-->
											<pay-rate>
												<xsl:value-of select="CovOption/OptionPct"/>
											</pay-rate>
											<!--赔付比例-->
											<column1>
												<xsl:value-of select="CovOption/OptionAmt"/>
											</column1>
											<!--保额豁免-->
											<waiver-num>
												<xsl:value-of select="CovOption/ProductCode"/>
											</waiver-num>
											<!--豁免险种代码-->
											<auto-renew>
												<xsl:value-of select="RenewableInd"/>
											</auto-renew>
											<!--是否自动续保-->
											<bonuspay-mode>
												<xsl:value-of select="//DivType/@tc"/>
											</bonuspay-mode>
											<!--红利领取方式-->
											<column2>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_2']/Payment/PaymentMethod/@tc"/>
											</column2>
											<!--生存金领取方式-->
											<pay-type>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_1']/Payment/PaymentForm/@tc"/>
											</pay-type>
											<!--年金领取方式-->
											<column3>
												<xsl:value-of select="//Holding[Policy]/Policy/Life/NonFortProv/@tc"/>
											</column3>
											<!--逾期未付选择(预留字段，暂不处理）-->
											<pay-period>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_1']/OLifEExtension/PayPeriod/@tc"/>
											</pay-period>
											<!--开始领取年期类型(预留字段，暂不处理）-->
											<pay-year>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_1']/OLifEExtension/PayYear"/>
											</pay-year>
											<!--开始领取年龄(预留字段，暂不处理）-->
											<end-period>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_1']/OLifEExtension/EndPeriod/@tc"/>
											</end-period>
											<!--结束领取年期类型(预留字段，暂不处理）-->
											<end-year>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_1']/OLifEExtension/EndYear"/>
											</end-year>
											<!--结束领取年龄(预留字段，暂不处理）-->
											<pay-freq>
												<xsl:value-of select="//Holding[Policy]/Policy/FinancialActivity[@id='FinancialActivity_2']/PaymentMode"/>
											</pay-freq>
											<!--领取频率(预留字段，暂不处理）-->
											<!--豁免险信息-循环-->
											<waivers>
												<xsl:for-each select="./CovOption">
													<waiver-detail>
														<!--豁免险种代码-->
														<waiver-code>
															<xsl:value-of select="./ProductCode"/>
														</waiver-code>
														<!--保费豁免-->
														<premium>
															<xsl:value-of select="./OptionPct"/>
														</premium>
														<!--保额豁免-->
														<amount>
															<xsl:value-of select="./OptionAmt"/>
														</amount>
													</waiver-detail>
												</xsl:for-each>
											</waivers>
										</product>
									</xsl:for-each>
								</products>
								<!--Variable: 权益对应付款帐号ID-->
								<xsl:for-each select="../Relation[OriginatingObjectType/@tc='4' and RelationRoleCode/@tc='1001']">
									<xsl:variable name="Bank1ID">
										<xsl:value-of select="./@RelatedObjectID"/>
									</xsl:variable>
									<xsl:variable name="Bank1Num">
										<xsl:value-of select="position()"/>
									</xsl:variable>
									<xsl:for-each select="../Holding[@id=string($Bank1ID)]">
										<!--缴费方式信息-->
										<xsl:if test="$Bank1Num=1">
											<bank-code>
												<xsl:value-of select="Banking/OLifEExtension/BankCode"/>
											</bank-code>
											<!--银行代码-->
											<branch-bank>
												<xsl:value-of select="Banking/OLifEExtension/BankBranchCode"/>
											</branch-bank>
											<!--分行代码-->
											<bank-account>
												<xsl:value-of select="Banking/AccountNumber"/>
											</bank-account>
											<!--银行账号-->
											<account-name>
												<xsl:value-of select="Banking/AcctHolderName"/>
											</account-name>
											<!--账户所有人姓名-->
											<account-type>
												<xsl:value-of select="Banking/CreditDebitType/@tc"/>
											</account-type>
											<!--卡折-->
										</xsl:if>
										<xsl:if test="$Bank1Num=2">
											<column2>
												<xsl:value-of select="//Holding[@id='Policy_1']/Policy/PaymentMethod/@tc"/>
											</column2>
											<!--交费形式-->
											<column3>
												<xsl:value-of select="Banking/OLifEExtension/BankCode"/>
											</column3>
											<!--银行代码-->
											<column4>
												<xsl:value-of select="Banking/OLifEExtension/BankBranchCode"/>
											</column4>
											<!--分行代码-->
											<bank-accno>
												<xsl:value-of select="Banking/AccountNumber"/>
											</bank-accno>
											<!--银行账号-->
											<acc-bankname>
												<xsl:value-of select="Banking/AcctHolderName"/>
											</acc-bankname>
											<!--账户所有人姓名-->
											<column5>
												<xsl:value-of select="Banking/CreditDebitType/@tc"/>
											</column5>
											<!--卡折-->
										</xsl:if>
									</xsl:for-each>
								</xsl:for-each>
								<!--保险金付款账户授循环 -->
								<notifications>
									<xsl:for-each select="//FormInstance">
										<notification>
											<!--告知-循环-->
											<customer>
												<xsl:choose>
													<xsl:when test="RelatedObjectType/@tc=8">
														<xsl:choose>
															<xsl:when test="$HasWaiver&gt;0">
																<xsl:choose>
																	<xsl:when test="$MainRelation!=1">  
                        A2
                        </xsl:when>
																	<xsl:otherwise>
                        P
                        </xsl:otherwise>
																</xsl:choose>
															</xsl:when>
															<xsl:otherwise>
                        P
                        </xsl:otherwise>
														</xsl:choose>
													</xsl:when>
													<xsl:otherwise>
														<xsl:choose>
															<xsl:when test="RelatedObjectType/@tc=1">
                        A1
                        </xsl:when>
															<xsl:otherwise>
                        N
                        </xsl:otherwise>
														</xsl:choose>
													</xsl:otherwise>
												</xsl:choose>
											</customer>
											<!--角色-->
											<declaration-details>
												<xsl:for-each select="FormResponse">
													<declaration-detail>
														<sort-num>
															<xsl:value-of select="substring(//@RelatedObjectID,7,7)-1"/>
														</sort-num>
														<!--被保人序号-->
														<decl-id>
															<xsl:value-of select="ResponseCode"/>
														</decl-id>
														<!--告知编码-->
														<fill1>
															<xsl:choose>
																<xsl:when test="ResponseText='Y'">
                              是
                              </xsl:when>
																<xsl:otherwise>
																	<xsl:choose>
																		<xsl:when test="ResponseText='N'">
                                否
                                </xsl:when>
																		<xsl:otherwise>
																			<xsl:value-of select="ResponseText"/>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</fill1>
														<!--告知结果-->
													</declaration-detail>
												</xsl:for-each>
											</declaration-details>
										</notification>
									</xsl:for-each>
								</notifications>
							</xsl:for-each>
						</application>
					</request-underwriting>
					<request-policy-issue>
						<apply-code>
							<xsl:value-of select="//OLifE/Holding[@id='Policy_1']/Policy/ApplicationInfo/HOAppFormNumber"/>
						</apply-code>
						<uw-trans-id/>
						<invoice-code/>
						<print-code>
							<xsl:value-of select="//OLifE/Holding[@id='Policy_1']/Policy/ApplicationInfo/HOAppFormNumber"/>
						</print-code>
						<premium>
                                </premium>
						<allow-manual-uw/>
						<policy-print-type/>
					</request-policy-issue>
				</request-newbiz>
			</xsl:for-each>
		</infopost-request>
	</xsl:template>
</xsl:stylesheet>
